#include <stdio.h>
#include <time.h>

int main()
{
    char buff[64];
    time_t t = time(NULL);
    struct tm *ptm = localtime(&t);
    strftime(buff, sizeof buff, "[%Y-%m-%d %H:%M:%S]", ptm);
    printf("%s", buff);
    return 0;
}
